﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Split
{
    class Expressions
    {
        static public void Split(ref string Code,ref List<Expression> CodeTokens,string[] SpaceSplit)
        {
            int Count = 0; //List用変数
            CodeTokens.Add(new Expression());
            foreach (string Word in SpaceSplit)
            {
                if (Word == "") continue;

                if (Word == ";") //文の終わりだったら
                {
                    CodeTokens.Add(new Expression());
                    Count++;
                }
                else //文の途中なら
                {
                    CodeTokens[Count].TokenList.Add(Word);
                }
            }
        }
    }
}
